import { api, request } from '@/api/request.js'


//? 用户登录
export const login = (user) => request(api.post, '/api/auth/login', user)

//? 用户注册 三重保险让数据库自己生成id
export const register = (user) => request(api.post, '/api/auth/register', { ...user, id: null })

// ?退出登录
export const logout = () => request(api.get, '/api/auth/logout')